﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Custom="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:im="clr-namespace:Microsoft.Expression.Interactivity.Media;assembly=Microsoft.Expression.Interactions" x:Name="phoneApplicationPage" 
    x:Class="WP7Chess.AboutPage"
    SupportedOrientations="Portrait"
    mc:Ignorable="d" Orientation="Portrait"
    d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True"
    xmlns:local="clr-namespace:WP7Chess"
    local:TiltEffect.IsTiltEnabled="True">
	<phone:PhoneApplicationPage.Resources>
		<Storyboard x:Name="OpenStoryboard">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="PageTitle">
				<EasingDoubleKeyFrame KeyTime="0" Value="-90"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="0">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="PageTitle">
				<EasingDoubleKeyFrame KeyTime="0" Value="-238"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="0">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="ContentPanel">
				<EasingDoubleKeyFrame KeyTime="0" Value="-90"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="ContentPanel">
				<EasingDoubleKeyFrame KeyTime="0" Value="-220"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationZ)" Storyboard.TargetName="ContentPanel">
				<EasingDoubleKeyFrame KeyTime="0" Value="15"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="CloseStoryboard">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="PageTitle">
				<SplineDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="90">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="PageTitle">
				<SplineDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="230">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="ContentPanel">
				<SplineDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="-90">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="ContentPanel">
				<SplineDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="279">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationZ)" Storyboard.TargetName="ContentPanel">
				<SplineDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="-12">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</phone:PhoneApplicationPage.Resources>
 
    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

	<phone:PhoneApplicationPage.FontFamily>
		<StaticResource ResourceKey="PhoneFontFamilyNormal"/>
	</phone:PhoneApplicationPage.FontFamily>
	<phone:PhoneApplicationPage.FontSize>
		<StaticResource ResourceKey="PhoneFontSizeNormal"/>
	</phone:PhoneApplicationPage.FontSize>
	<phone:PhoneApplicationPage.Foreground>
		<StaticResource ResourceKey="PhoneForegroundBrush"/>
	</phone:PhoneApplicationPage.Foreground>
	<Custom:Interaction.Triggers>
		<Custom:EventTrigger>
			<im:ControlStoryboardAction Storyboard="{StaticResource OpenStoryboard}"/>
		</Custom:EventTrigger>
		<Custom:EventTrigger EventName="BackKeyPress">
			<im:ControlStoryboardAction Storyboard="{StaticResource CloseStoryboard}"/>
		</Custom:EventTrigger>
	</Custom:Interaction.Triggers>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="{StaticResource appTitle}" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="about" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}" RenderTransformOrigin="0.5,0.5">
            	<TextBlock.RenderTransform>
            		<CompositeTransform/>
            	</TextBlock.RenderTransform>
            	<TextBlock.Projection>
            		<PlaneProjection/>
            	</TextBlock.Projection>
            </TextBlock>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0" RenderTransformOrigin="0.5,0.5">
        	<Grid.RenderTransform>
        		<CompositeTransform/>
        	</Grid.RenderTransform>
        	<Grid.Projection>
        		<PlaneProjection/>
        	</Grid.Projection>
            <StackPanel>
                <TextBlock TextWrapping="Wrap"><Run Text="This is a port of one of the first Silveright samples (at that time version 1.1)."/></TextBlock>
                <TextBlock TextWrapping="Wrap"><Run Text="Sample showcased difference in performance of C# vs JavaScript and can still be found at:"/></TextBlock>
                <HyperlinkButton Click="HyperlinkButton_Click" Content="www.silverlight.net" Tag="http://www.silverlight.net/community/samples/details.aspx?__itemid=15781"/>
                <TextBlock TextWrapping="Wrap" Margin="0,3,0,0"><Run Text="This port is work-in progress; missing features are:"/></TextBlock>
                <TextBlock><Run Text="- JavaScript AI option"/></TextBlock>
                <TextBlock TextWrapping="Wrap" Margin="3,0,0,0"><Run Text="This project is open-source under:"/></TextBlock>
                <HyperlinkButton Click="HyperlinkButton_Click" Content="Microsoft Public License (Ms-PL)" Tag="http://opensource.org/licenses/ms-pl.html"/>
                <TextBlock TextWrapping="Wrap" Margin="0,3,0,0"><Run Text="Source of this project can be found at:"/></TextBlock>
                <HyperlinkButton Click="HyperlinkButton_Click" Content="www.codeplex.com" Tag="http://openchess.codeplex.com/"/>
            </StackPanel>
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>
